#include <iostream>
#include <fstream>
#include <string>

using namespace std;

int main()
{
	float digit;
	float total = 0;
	int number = 0;
	float average;
	 
	cout << "Digits" << "\t" << "Added #s" << "\t" << "Number of lines" << endl << endl;
	
	ifstream mydata("Input.txt");

	if(mydata.is_open())
	{
		while(mydata.good())
		{
			 mydata >> digit;
			 total = total + digit;
			
			 cout << digit << "\t" << total << "\t\t" << ++number <<endl;
		}
		average = total / number;

		cout << "Average is: " << average << endl;
	
		mydata.close();
	}
	else
	{
		cout << "unable to find data." <<endl;
	}

	return 0;
}
